<?php
$this->language->load('METROPOLITEN_custom/METROPOLITEN');
$text_toggle = $this->language->get('text_toggle');
$text_question = $this->language->get('text_question');
$text_facebook = $this->language->get('text_facebook');
$text_twitter = $this->language->get('text_twitter');
$text_twitter_follow = $this->language->get('text_twitter_follow');
$text_payment = $this->language->get('text_payment');
?>

<div id="footer">
  <div class="inner inner_lifted">
  <?php echo $footer_icon_teaser; ?>
    <div class="clear"></div>
  </div>
  
<?php if ($modules) { ?>  
  <div class="inner inner_mods">
  
  <?php if (count($modules) == 1) { ?>
  <?php $modNum = "full_width"; ?>
<?php } ?>
<?php if (count($modules) == 2) { ?>
  <?php $modNum = "one_half"; ?>
<?php } ?>
<?php if (count($modules) == 3) { ?>
  <?php $modNum = "one_third"; ?>
<?php } ?>
<?php if (count($modules) == 4) { ?>
  <?php $modNum = "one_fourth"; ?>
<?php } ?>
<?php if (count($modules) > 4) { ?>
  <?php $modNum = "full_width"; ?>
<?php } ?>
<?php
  $modNumber = count($modules);
  $startmodNumber = 0;
  ?>  
  
  	<?php foreach ($modules as $module) { ?>
    <div class="<?php echo $modNum; ?> <?php if ($startmodNumber < $modNumber - 1) { ?><?php echo ""; ?><?php } else { ?><?php echo "last"; ?><?php } ?>">
      <?php echo $module; ?>
    </div>
    <?php $startmodNumber = $startmodNumber + 1; ?>
      <?php } ?>
    <div class="clear"></div>
  </div>
 <?php } ?> 
  
  <div class="inner">
    <div class="one_fourth column element_from_left">
      <h4><?php echo $text_information; ?></h4>
      <ul class="footer_links">
        <?php foreach ($informations as $information) { ?>
        <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
        <?php } ?>
      </ul>
    </div>
    <div class="clear"></div>
    <div class="footer_bottom">
      <div class="one_half card_icons">
        <?php if(($this->config->get('METROPOLITENControl_paypal') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="paypal_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_visa') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="visa_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_electron') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="electron_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_master') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="master_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_maestro') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="maestro_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_cirrus') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="cirrus_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_american') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="american_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_2checkout') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="two_checkout_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_delta') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="delta_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_discover') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="discover_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_google') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="google_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_moneybookers') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="moneybookers_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_sage') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="sage_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_solo') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="solo_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_switch') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="switch_icon cards_icon"></div>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_western') == '1') && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <div class="western_icon cards_icon"></div>
        <?php } ?>
      </div>
      <div class="one_half last social_icons">
      <div class="socials">
    <?php if(($this->config->get('METROPOLITENControl_facebook_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_facebook_id') ?>" title="facebook"><img src="catalog/view/theme/METROPOLITEN/image/icon_facebook.png" alt="Facebook" /></a>
        <?php } ?>
    <?php if(($this->config->get('METROPOLITENControl_twitter_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_twitter_id') ?>" title="Twitter"><img src="catalog/view/theme/METROPOLITEN/image/icon_twitter.png" alt="Twitter" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_pinterest_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_pinterest_id') ?>" title="Pinterest"><img src="catalog/view/theme/METROPOLITEN/image/icon_pinterest.png" alt="Pinterest" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_google_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_google_id') ?>" title="Google+"><img src="catalog/view/theme/METROPOLITEN/image/icon_google.png" alt="Google+" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_youtube_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_youtube_id') ?>" title="YouTube"><img src="catalog/view/theme/METROPOLITEN/image/icon_youtube.png" alt="YouTube" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_vimeo_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_vimeo_id') ?>" title="Vimeo"><img src="catalog/view/theme/METROPOLITEN/image/icon_vimeo.png" alt="Vimeo" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_linkedin_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_linkedin_id') ?>" title="LinkedIn"><img src="catalog/view/theme/METROPOLITEN/image/icon_linkedin.png" alt="LinkedIn" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_dribble_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_dribble_id') ?>" title="Dribbble"><img src="catalog/view/theme/METROPOLITEN/image/icon_dribbble.png" alt="Dribbble" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_picasa_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_picasa_id') ?>" title="Picasa"><img src="catalog/view/theme/METROPOLITEN/image/icon_picasa.png" alt="Picasa" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_flickr_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_flickr_id') ?>" title="Flickr"><img src="catalog/view/theme/METROPOLITEN/image/icon_flickr.png" alt="Flickr" /></a>
        <?php } ?>
        <?php if(($this->config->get('METROPOLITENControl_instagram_id') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <a href="<?php echo $this->config->get('METROPOLITENControl_instagram_id') ?>" title="Instagram"><img src="catalog/view/theme/METROPOLITEN/image/icon_instagram.png" alt="Instagram" /></a>
        <?php } ?>
    </div>
        
      </div>
      <div class="clear"></div>
      <div class="fuillwidth">
      <?php
      $METROPOLITENControl_seals = $this->config->get('METROPOLITENControl_seals' . $this->config->get('config_language_id'));
      ?>
      <?php if(($METROPOLITENControl_seals != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
        <?php echo html_entity_decode($METROPOLITENControl_seals); ?>
        <?php } ?>
      </div>
    </div>
  </div>
</div>

<div id="powered">
  <div class="inner">
    <?php if(($this->config->get('METROPOLITENControl_copyright') != null) && ($this->config->get('METROPOLITENControl_status') == '1')) { ?>
    <?php echo html_entity_decode($this->config->get('METROPOLITENControl_copyright')); ?>
    <?php } ?>
  </div>
</div>

</div>


				<?php if( ! empty( $cookie_law['text'] ) ) { ?>
					<?php
						$cookie_positions = explode( '_', $cookie_law['position'] );
					?>
					
					<style type="text/css">
						.cookie_law {
							position: fixed;
							<?php if( in_array( 'bottom', $cookie_positions ) ) { ?>
								bottom: <?php echo (int) $cookie_law['margin_bottom']; ?>px;
							<?php } ?>
							<?php if( in_array( 'top', $cookie_positions ) ) { ?>
								top: <?php echo (int) $cookie_law['margin_top']; ?>px;
							<?php } ?>
							<?php if( in_array( 'left', $cookie_positions ) ) { ?>
								left: <?php echo (int) $cookie_law['margin_left']; ?>px;
							<?php } ?>
							<?php if( in_array( 'right', $cookie_positions ) ) { ?>
								right: <?php echo (int) $cookie_law['margin_right']; ?>px;
							<?php } ?>
							<?php if( ! in_array( $cookie_law['position'], array( 'top', 'bottom' ) ) ) { ?>
								max-width: 200px;
							<?php } ?>
							color: #fff;
							border-radius: <?php echo (int) $cookie_law['border_radius']; ?>px;
							box-shadow: 0 0 5px #000000;
							padding: <?php echo (int) $cookie_law['padding_top']; ?>px <?php echo (int) $cookie_law['padding_right']; ?>px <?php echo (int) $cookie_law['padding_bottom']; ?>px <?php echo (int) $cookie_law['padding_left']; ?>px;
							background: rgba(0,0,0,<?php echo $cookie_law['transparency']; ?>);
							z-index: 99999;
							display: none;
						}
						
						.cookie_law a {
							color: #fff;
						}
						
						.cookie_law h1, .cookie_law h2, .cookie_law h3, .cookie_law h4, .cookie_law h5, .cookie_law h6 {
							padding: 0 0 15px 0;
							margin: 0;
							font-weight: normal;
							-webkit-margin-before: 0;
							-webkit-margin-after: 0;
							-webkit-margin-start: 0;
							-webkit-margin-end: 0;
						}
						
						.cookie_law h1 {
							font-size: 18px;
							color:#ffffff;
						}
						.cookie_law h2 {
							font-size: 17px;
							color:#ffffff;
						}
						.cookie_law h3 {
							font-size: 16px;
							color:#ffffff;
						}
						
						.cookie_buttons {
							text-align: center;
							padding-top: 10px;
						}
						
						.cookie_buttons a {
							width: 32px;
							height: 32px;
							margin: 0 3px;
							color#ffffff !Important;
							width:40px;
							height:40px;
							display:inline-block;
							line-height:40px;
							text-align:center;
							vertical-align:middle;
							font-size:21px;
							text-decoration:none;
							border-radius: 3px;
							-moz-border-radius: 3px;
							-webkit-border-radius: 3px;
						}
						.cookie_buttons a.cookie-btn-yes {
						background-color:#6fc200;
						
						}
						.cookie_buttons a.cookie-btn-no {
						background-color:#df0008;
						
						}
						
						.cookie_law table.cookie_table {
							max-width: 960px;
							margin: 0 auto;
							
							> tr > td {
								vertical-align: middle;
							}
						}
						.cookie_law table.cookie_table td {
								padding: 10px;
						}
					</style>
					<div id="cookie-info" class="cookie_law <?php echo $cookie_law['position']; ?>">
						<?php if( in_array( $cookie_law['position'], array( 'top', 'bottom' ) ) ) { ?>
							
									<?php echo $cookie_law['text']; ?>
									
										<div class="cookie_buttons">
											<a title="<?php echo $cookie_law['text_yes']; ?>" href="#" class="cookie-btn-yes"><i class="icon-check"></i></a>
											<a title="<?php echo $cookie_law['text_no']; ?>" href="https://www.google.com" class="cookie-btn-no"><i class="icon-remove"></i></a>
										</div>
									
						<?php } else { ?>
							<?php echo $cookie_law['text']; ?>
							
							<div class="cookie_buttons">
								<a title="<?php echo $cookie_law['text_yes']; ?>" href="#" class="cookie-btn-yes"><i class="icon-check"></i></a>
								<a title="<?php echo $cookie_law['text_no']; ?>" href="<?php echo $cookie_law['url_no']; ?>" class="cookie-btn-no"><i class="icon-remove"></i></a>
							</div>
						<?php } ?>
					</div>
					
					<script type="text/javascript">
						(function(){
							var pos		= '<?php echo $cookie_law['position']; ?>',
								clear	= <?php echo ! empty( $cookie_law['clear_cookies'] ) ? 'true' : 'false'; ?>;
								$info	= $('#cookie-info');
							
							if( getCookie('cookie_law') == '1' )
								return;
								
							function clearCookies(){
									var cookies	= document.cookie.split(';');
									var pathBits = location.pathname.split('/');
									
									for( var i = 0; i < cookies.length; i++ ) {
										var name = cookies[i].split('=')[0];
										
										if( name == 'PHPSESSID' ) continue;
										
										var pathCurrent = ' path=';
										
										document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
										document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; domain=.' + window.location.hostname;
										document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; domain=' + window.location.hostname;
										
										for (var j = 0; j < pathBits.length; j++) {
											pathCurrent += ((pathCurrent.substr(-1) != '/') ? '/' : '') + pathBits[j];
											document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; ' + pathCurrent + ';';
											document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; ' + pathCurrent + '; domain=.' + window.location.hostname;
											document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; ' + pathCurrent + '; domain=' + window.location.hostname;
										}
									}
							}
							
							if( clear )
								clearCookies();
								
							$info.show();
							
							$(window).bind('resize.ci', function(){
								if( pos == 'top' || pos == 'bottom' ) {
									$info.width( $(window).width() - ( $info.outerWidth( true ) - $info.width() ) );
								}
							}).trigger('resize.ci');
							
							
							
							function getCookie(c_name) {
								var c_value = document.cookie,
									c_start = c_value.indexOf(" " + c_name + "=");
								
								if( c_start == -1 ) {
									c_start = c_value.indexOf(c_name + "=");
								}
								
								if( c_start == -1 ) {
									c_value = null;
								} else {
									c_start = c_value.indexOf("=", c_start) + 1;
									var c_end = c_value.indexOf(";", c_start);
									
									if( c_end == -1 ) {
										c_end = c_value.length;
									}
									
									c_value = unescape(c_value.substring(c_start,c_end));
								}
								
								return c_value;
							}
							
							$info.find('.cookie-btn-yes').click(function(){
								var exdate	= new Date(),
									value	= '1',
									name	= 'cookie_law';
								
								exdate.setDate(exdate.getDate() + 365);
								
								value = escape( value ) + "; path=/; expires="+exdate.toUTCString();
								
								document.cookie=name + "=" + value;
								
								$info.hide();
								
								return false;
							});
							
							$info.find('.cookie-btn-no').click(function(){
								var href = $(this).attr('href');
								
								clearCookies();
								
								if( href == '' || href == '#' ) {
									$info.hide();
									
									return false;
								}
							});
						})();
					</script>
				<?php } ?>
			
</body></html>